#!/usr/bin/env python

"""
Demonstration of usage of qm1538.py

Copyright (C) 2010 Thomas Schulz, t.schulz3016@gmail.com
"""


import qm1538
import time


def main():
    dmm = qm1538.QM1538()
    dmm.Open()
    while True:
        v = dmm.ReadValue()
        t = time.gmtime()
        ts = time.strftime("%Y-%m-%d %H:%M:%S", t)
        print ts, v
        
        time.sleep(5)


if __name__ == "__main__":
    main()
    
